<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Preparing for the Backup">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000002164779996.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="">
  <meta name="DC.Publisher" content="20250306">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="EN-US_TOPIC_0000002200106653">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Preparing for the Backup</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="EN-US_TOPIC_0000002200106653"></a><a name="EN-US_TOPIC_0000002200106653"></a>
  <h1 class="topictitle1">Preparing for the Backup</h1>
  <div>
   <p>Before the backup, prepare related information by following instructions in <a href="#EN-US_TOPIC_0000002200106653__en-us_topic_0000001505943769_table10744125193920">Table 1</a>.</p>
   <div class="note">
    <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
    <div class="notebody">
     <ul>
      <li><span>Unless otherwise specified, this section uses Linux localhost.localdomain 2.6.32-431.el6.x86_64 and Kingbase V8.0 as an example. The operations may vary according to the operating system or database version.</span></li>
      <li><span>If the Kingbase database is deployed in a cluster, you need to log in to all hosts where the cluster instances reside and perform the following operations unless otherwise specified.</span></li>
     </ul>
    </div>
   </div>
   <div class="tablenoborder">
    <a name="EN-US_TOPIC_0000002200106653__en-us_topic_0000001505943769_table10744125193920"></a><a name="en-us_topic_0000001505943769_table10744125193920"></a>
    <table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002200106653__en-us_topic_0000001505943769_table10744125193920" frame="border" border="1" rules="all">
     <caption>
      <b>Table 1 </b>Preparing for the Backup
     </caption>
     <colgroup>
      <col style="width:26.93%">
      <col style="width:60.040000000000006%">
      <col style="width:13.03%">
     </colgroup>
     <thead align="left">
      <tr>
       <th align="left" class="cellrowborder" valign="top" width="26.93%" id="mcps1.3.3.2.4.1.1"><p>Item</p></th>
       <th align="left" class="cellrowborder" valign="top" width="60.040000000000006%" id="mcps1.3.3.2.4.1.2"><p>How to Obtain</p></th>
       <th align="left" class="cellrowborder" valign="top" width="13.03%" id="mcps1.3.3.2.4.1.3"><p>To Be Used In</p></th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td class="cellrowborder" valign="top" width="26.93%" headers="mcps1.3.3.2.4.1.1 "><p><span><strong>Username</strong></span></p></td>
       <td class="cellrowborder" valign="top" width="60.040000000000006%" headers="mcps1.3.3.2.4.1.2 ">
        <div class="p">
         To query the name of the database installation user, perform the following steps:
         <ol>
          <li>Use PuTTY to log in to the host where the Kingbase database resides.</li>
          <li>Run the following command to query the name of the Kingbase database installation user. The database port is set by the user during database registration. The default port number is <strong>54321</strong>.<pre class="screen">ss -ntlp | grep <em>Database port</em></pre> <p>The command output similar to the following is displayed, in which <strong>kingbase</strong> indicates the name of the database installation user:</p> <pre class="screen">users:(("kingbase",25085,4))
LISTEN     0      128                       *:54321                    *:*      users:(("kingbase",25085,3))</pre></li>
         </ol>
        </div></td>
       <td class="cellrowborder" rowspan="3" valign="top" width="13.03%" headers="mcps1.3.3.2.4.1.3 "><p><a href="en-us_topic_0000002164779988.html">Step 3: Registering the Database of a Single Kingbase Instance</a></p> <p><a href="en-us_topic_0000002200106629.html">Step 4: Registering the Database of a Kingbase Cluster Instance</a></p></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.4.1.1 "><p><span><strong>Database Installation Path</strong></span></p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.4.1.2 ">
        <ol>
         <li>Use PuTTY to log in to the host where the Kingbase database resides.</li>
         <li>Run the following command to check the installation path of the Kingbase database:<pre class="screen">ps -ef | grep kingbase</pre> <p>The command output of a single-node instance is as follows.</p> <p><span><img src="en-us_image_0000002200021109.png"></span></p> <p>The command output of a cluster instance is as follows.</p> <p><span><img src="en-us_image_0000002164780072.png"></span></p></li>
        </ol></td>
      </tr>
      <tr>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.4.1.1 "><p><span><strong>Service Plane IP Address</strong></span></p></td>
       <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.4.1.2 ">
        <ol>
         <li>Use PuTTY to log in to the host where the Kingbase database resides.</li>
         <li>Obtain the value of the <strong>listen_addresses</strong> field.
          <ol type="a">
           <li>Run the following command to view the data directory of the Kingbase database:<pre class="screen">ps -ef | grep kingbase</pre> <p>The command output of a single-node instance is as follows.</p> <p><span><img src="en-us_image_0000002164620344.png"></span></p> <p>The command output of a cluster instance is as follows.</p> <p><span><img src="en-us_image_0000002200106693.png"></span></p></li>
           <li>Run the following command to go to the data directory of the Kingbase database:<pre class="screen">cd <em>/opt/Kingbase/ES/V8/data</em></pre></li>
           <li>Run the following command to open the <strong>kingbase.conf</strong> file:<pre class="screen">vim kingbase.conf</pre></li>
           <li>Run the following command to search for the line where <strong>listen_addresses</strong> is located:<pre class="screen">/listen_addresses</pre> <p>The command output is as follows.</p>
            <div class="p">
             <span><img src="en-us_image_0000002164620348.png"></span>
             <div class="note">
              <span class="notetitle"> NOTE: </span>
              <div class="notebody">
               <p>If the value is <strong>*</strong>, use the IP address for logging in to the database background.</p>
               <p>If the value is an IP address, use any IP address in the value of <strong>listen_addresses</strong> for a single-node system or the active node IP address in the value of <strong>listen_addresses</strong> for a cluster.</p>
              </div>
             </div>
            </div></li>
           <li>Run the following command to query the IP address of the active node. The IP address in the <strong>primary</strong> line is the IP address of the active node.<pre class="screen">su - kingbase -c '/<em>Installation directory</em>/bin/repmgr cluster show'</pre> <p>The command output is as follows.</p> <p><span><img src="en-us_image_0000002200106689.png"></span></p></li>
          </ol></li>
        </ol></td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000002164779996.html">Backup</a>
    </div>
   </div>
  </div>
 </body>
</html>